package com.yfl.tingyu.mapper;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yfl.tingyu.pojo.Host;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.Map;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author ${author}
 * @since 2020-05-29
 */
public interface HostMapper extends BaseMapper<Host> {
    @Select("select * from t_host left join t_host_power ON t_host.hid = t_host_power.hostid ${ew.customSqlSegment}")
    IPage<Map<String,Object>> selectHosts(IPage<Map<String,Object>> hostPage, @Param(Constants.WRAPPER) QueryWrapper<Map<String,Object>> wrapper);

}
